from django.conf.urls import url


from goods import views

urlpatterns = [
# GET /goods/categories/(?P<category_id>\d+)/hotskus/
#     url(r'^categories/(?P<pk>\d+)/skus/$', views.GoodsDetailAPIView.as_view()),
#     url(r'^categories/(?P<pk>\d+)/skus/$', views.SKUListAPIView.as_view()),

    url(r'^index/$',views.IndexAPIView.as_view()),
# GET /goods/categories/(?P<category_id>\d+)/hotskus/
    url(r'^categories/(?P<category_id>\d+)/hotskus/$',views.HotsSkuAPIView.as_view()),
    url(r'^categories/(?P<category_id>\d+)/skus/$',views.SKUListAPIView.as_view()),
]

from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('search', views.SKUSearchViewSet, base_name='skus_search')

urlpatterns += router.urls